using System.Threading.Tasks;
using AvalonAdmin.ViewModels;
using Avalonia.Controls;
using Ursa.Controls;

namespace AvalonAdmin.Views;


public partial class LoadingWindow : SplashWindow
{
    public LoadingWindow()
    {
        InitializeComponent();
    }

    protected override async Task<Window?> CreateNextWindow()
    {
        if (this.DialogResult is true)
        {
            // Login UI 
            var loginPage = new Login();
            loginPage.DataContext = new LoginViewModel(loginPage);
            return loginPage;
        }
        return null;
    }
}

 
 